package com.whfc.fuum.enums;

/**
 * @ClasssName MachTypeState
 * @Description 图片颜色枚举
 * @Author hw
 * @Date 2020/8/24 19:51
 * @Version 1.0
 */
public enum MachTypeState {


    GREEN(3, "绿色图标"),
    RED(2, "红色图标"),
    BLUE(1, "蓝色图标"),
    GRAY(0, "灰色图标");

    private Integer value;

    private String desc;

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    MachTypeState(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MachTypeState parseValue(int value) {
        switch (value) {
            case 0:
                return RED;
            case 1:
                return GREEN;
            case 2:
                return BLUE;
            case 3:
                return GRAY;
            default:
                return null;
        }
    }
}
